<!-- 合同通用查看弹窗 -->
<template>
  <Dialog :title="dialogTitle" v-model="dialogVisible" width="850">
    <div class="mt-10" style="height: 550px;">
      <iframe style="width: 100%;height: 100%" :src="ctrInfo.ctrFileUrl" frameborder="0"></iframe>
    </div>
    <template #footer >
      <el-button @click="dialogVisible = false">取 消</el-button>
    </template>
  </Dialog>
</template>
<script lang="ts" setup>
import {ElMessage} from 'element-plus'
import { crtInfoGet} from '@/api/contract/ctrInfo'
const message = useMessage() // 消息弹窗
const dialogTitle = ref('查看合同')
const dialogVisible = ref(false)  
const ctrNo = ref('')
const ctrInfo = ref<any>({})
function open(_id: string,_ctrNo: string) {
  dialogVisible.value = true
  ctrNo.value = _ctrNo
  getCtrInfo(_id)
}


// 获取合同信息
async function getCtrInfo(id) {
  const params = {
    id
  }
  const res = await crtInfoGet(params)
  console.log('getTplReviewRecord',res)
  ctrInfo.value = res
}
/** 提交表单 */
defineExpose({
  open,
})  
</script>
<style lang="scss" scoped> 

</style>
